﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Dominio
{
    public class Deporte
    {
        public int Id { get; set; }
        public string Nombre { get; set; }

        public Deporte() { }
    }

    public class DeporteComparer : IEqualityComparer<Deporte>
    {

        public bool Equals(Deporte x, Deporte y)
        {
            if (Object.ReferenceEquals(x, y)) return true;

            if (Object.ReferenceEquals(x, null) || Object.ReferenceEquals(y, null))
                return false;

            return x.Id.Equals(y.Id);
        }

        public int GetHashCode(Deporte deporte)
        {
            if (Object.ReferenceEquals(deporte, null)) return 0;

            int hashDeporteId = deporte.Id.GetHashCode();
            return hashDeporteId;
        }

        
        
    }
}
